(* WaitList.pas *)

program WaitList;

uses nodes, ListDl;

var
   i : integer;
   t : link;
begin
   NodesNr := ReadData('data.in');
   DummyIns();
   for i := 0 to NodesNr do
      NodeIns(NodesTab[i]);
   t := DummyLink^.prev;
   while t^.item.NextTime <> 0 do
   begin
      print(t);
      t := t^.prev; 
   end;
end.
